package com.Lyf.stock.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/stock")
public class StockController {

    @PostMapping("/stock_test")
    public String orderTest()
    {
        return "hello stock";
    }

    @GetMapping("/test")
    public String test()
    {
        System.out.println("xxx");
        return "hello test";
    }


    @GetMapping("/cutStock")
    public String cutStock()
    {
        int currentStock=100;
        System.out.println("调用了stock服务,进行削减库存操作");
        System.out.println("当前库存容量为:"+currentStock);
        return "当前库存容量为:"+currentStock;
    }

}
